package pojo;
// Generated 22/11/2011 21:26:43 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Usuario generated by hbm2java
 */
@Entity
@Table(name="usuario"
    ,catalog="affero"
)
public class Usuario  implements java.io.Serializable {


     private Integer id;
     private String nome;
     private Set arquivoses = new HashSet(0);

    public Usuario() {
    }

	
    public Usuario(String nome) {
        this.nome = nome;
    }
    public Usuario(String nome, Set arquivoses) {
       this.nome = nome;
       this.arquivoses = arquivoses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    @Column(name="nome", nullable=false, length=200)
    public String getNome() {
        return this.nome;
    }
    
    public void setNome(String nome) {
        this.nome = nome;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="usuario")
    public Set getArquivoses() {
        return this.arquivoses;
    }
    
    public void setArquivoses(Set arquivoses) {
        this.arquivoses = arquivoses;
    }




}


